<script>
    function Person(name, age) {
        this.name = name
        this.age = age
        this.sayHi = function() {
            console.log("sayHi")
        }
    }
    // Person.prototype.sing = function() {
    //     console.log('在看电视。')
    // }
    Person.prototype = {
        constructor: Person,
        sing: function() {
            console.log("在唱歌")
        }
    }
    let per = new Person('zhangsan', 19)
    let per2 = new Person('lis', 20)
    console.log(per.__proto__)
    console.dir(Person.prototype.constructor) //记录 是哪个构造函数生成的对象。
</script>